<?php
/*
Entite modelisant un Client   (cf dossier de conception)
Dans notre modelisation un client est un utilisateur
*/

class Client extends Utilisateur {
	
	
	 protected $telephone;
	 protected $eMail;
	 protected $adresse;
	 protected $ville;
	 protected $codePostal;
	 protected $sexe;
	
	// protected $reservations= array();
	
	
	public function __construct () {
		
		parent::__construct();
	}
	
	public function setTelephone($telephone)
    {
         $this->telephone = $telephone;
    }
	 
    public function setEmail($email)
    {
         $this->eMail = $email;
    }
	 
    public function setAdresse($adresse)
    {
          $this->adresse= $adresse;
    }
	 
	public function setVille($ville)
    {
          $this->ville= $ville;
    }
		public function setCodePostal($codepostal)
    {
          $this->codePostal= $codepostal;
    }
	
	public function setSexe($sexe)
    {
         $this->sexe= $sexe;
    }
  
        
    public function getTelephone()
    {
          return $this->telephone;
    }
        
    public function getEmail()
    {
          return $this->eMail;
    }
        
    public function getAdresse()
    {
          return $this->adresse;
    }
	public function getVille()
    {
            return $this->ville;
    }
		  
    public function getCodePostal()
    {
          return $this->codePostal;
    }
        
    public function getSexe()
    {
         return $this->sexe;
    }
	
	
	function __toString() {
		
		$xml = "<Client>\n";
		$xml .= "<id>".$this->id."</id>\n";
		$xml .= "<nom>".$this->nom."</nom>\n";
		$xml .= "<prenom>".$this->prenom."</prenom>\n";
		$xml .= "<login>".$this->login."</login>\n";
		$xml .= "<motDePasse>".$this->motDePasse."</motDePasse>\n";
		$xml .= "<tel>".$this->telepone."</tel>\n";
		$xml .= "<ville>".$this->ville."</ville>\n";
		$xml .= "<codepostal>".$this->codePostal."</codepostal>\n";
		$xml .= "<mail>".$this->eMail."</mail>\n";
		$xml .= "<sexe>".$this->sexe."</sexe>\n";
		$xml .= "</Client>\n";
		return $xml;
	}
	
	
}



?>